package com.blandware.atleap.webapp.form.forum;

import javax.servlet.http.HttpServletRequest;
import com.blandware.atleap.webapp.form.BaseForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.upload.FormFile;
import org.apache.struts.upload.MultipartRequestHandler;
import java.util.Map;
import java.util.HashMap;

/**
 * @struts.form name="postForm" 
 */
public  class PostForm
    extends    BaseForm
    implements java.io.Serializable
{

    protected String topicId;

    protected String subject;

    protected String body;

    protected String authorUserId;

    protected String authorStr;

    protected String emailStr;

    protected Boolean first;

    protected String uri;

    protected Boolean active;

    protected Map titleMap;

    protected Map keywordsMap;

    protected Map descriptionMap;

    protected String id;

    protected String version;

    /** Default empty constructor. */
    public PostForm() {}

    public String getTopicId()
    {
        return this.topicId;
    }

   /**
    */
    public void setTopicId(String topicId)
    {
        this.topicId = topicId;
    }

    public String getSubject()
    {
        return this.subject;
    }

   /**
    * @struts.validator type="required"
    * @struts.validator-args arg0resource="forum.post.form.subject"
    */
    public void setSubject(String subject)
    {
        this.subject = subject;
    }

    public String getBody()
    {
        return this.body;
    }

   /**
    * @struts.validator type="required"
    * @struts.validator-args arg0resource="forum.post.form.body"
    */
    public void setBody(String body)
    {
        this.body = body;
    }

    public String getAuthorUserId()
    {
        return this.authorUserId;
    }

   /**
    */
    public void setAuthorUserId(String authorUserId)
    {
        this.authorUserId = authorUserId;
    }

    public String getAuthorStr()
    {
        return this.authorStr;
    }

   /**
    * @struts.validator type="required"
    * @struts.validator-args arg0resource="forum.post.form.authorStr"
    */
    public void setAuthorStr(String authorStr)
    {
        this.authorStr = authorStr;
    }

    public String getEmailStr()
    {
        return this.emailStr;
    }

   /**
    * @struts.validator type="email"
    * @struts.validator-args arg0resource="forum.post.form.email"
    */
    public void setEmailStr(String emailStr)
    {
        this.emailStr = emailStr;
    }

    public Boolean getFirst()
    {
        return this.first;
    }

   /**
    */
    public void setFirst(Boolean first)
    {
        this.first = first;
    }

    public String getUri()
    {
        return this.uri;
    }

   /**
    * @struts.validator type="required"
    * @struts.validator type="mask" msgkey="core.commons.errors.pageUri"
    * @struts.validator-args arg0resource="core.page.form.uri"
    * @struts.validator-var name="mask" value="^(\/[a-zA-Z0-9\-_\040]+)+$"
    */
    public void setUri(String uri)
    {
        this.uri = uri;
    }

    public Boolean getActive()
    {
        return this.active;
    }

   /**
    */
    public void setActive(Boolean active)
    {
        this.active = active;
    }

    public Map getTitleMap()
	{
		return this.titleMap;
	}
    public Object getTitle(String key)
	{
		return this.titleMap != null ? this.titleMap.get(key) : null;
	}

   /**
    */
    public void setTitleMap(Map titleMap)
	{
		this.titleMap = titleMap;
	}
    public void setTitle(String key, Object value)
	{
		if ( this.titleMap == null ) {
			this.titleMap = new HashMap();
		}
		this.titleMap.put(key, value);
	}

    public Map getKeywordsMap()
	{
		return this.keywordsMap;
	}
    public Object getKeywords(String key)
	{
		return this.keywordsMap != null ? this.keywordsMap.get(key) : null;
	}

   /**
    */
    public void setKeywordsMap(Map keywordsMap)
	{
		this.keywordsMap = keywordsMap;
	}
    public void setKeywords(String key, Object value)
	{
		if ( this.keywordsMap == null ) {
			this.keywordsMap = new HashMap();
		}
		this.keywordsMap.put(key, value);
	}

    public Map getDescriptionMap()
	{
		return this.descriptionMap;
	}
    public Object getDescription(String key)
	{
		return this.descriptionMap != null ? this.descriptionMap.get(key) : null;
	}

   /**
    */
    public void setDescriptionMap(Map descriptionMap)
	{
		this.descriptionMap = descriptionMap;
	}
    public void setDescription(String key, Object value)
	{
		if ( this.descriptionMap == null ) {
			this.descriptionMap = new HashMap();
		}
		this.descriptionMap.put(key, value);
	}

    public String getId()
    {
        return this.id;
    }

   /**
    */
    public void setId(String id)
    {
        this.id = id;
    }

    public String getVersion()
    {
        return this.version;
    }

   /**
    */
    public void setVersion(String version)
    {
        this.version = version;
    }

    /**
     * @see org.apache.struts.action.ActionForm#reset(org.apache.struts.action.ActionMapping,
     *                                                javax.servlet.http.HttpServletRequest)
     */
    public void reset(ActionMapping mapping, HttpServletRequest request) {
        // reset any boolean data types to false

        this.first = Boolean.FALSE;

        this.active = Boolean.FALSE;

        // reset all linking properties to null

        this.topicId = null;

        this.authorUserId = null;

// reset all mapped properties to default values

		this.titleMap = new HashMap();

		this.keywordsMap = new HashMap();

		this.descriptionMap = new HashMap();

    }

}
